package me.hl.mybatis.service;

import com.github.pagehelper.PageHelper;
import me.hl.mybatis.domain.Employees;
import me.hl.mybatis.respository.impl.EmployeeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Planck on 2016/1/21.
 */
@Service("employeesService")
public class EmployeeService {

    @Autowired
    private EmployeeRepository employeeRepository;

    public Employees get(long id){
        return employeeRepository.get(id);

    }

    public List<Employees> departmentEmployees(long departmentId){

        return employeeRepository.departmentEmployees(departmentId);
    }

    public Employees selectFirst(){
        return employeeRepository.getFirst();
    }

    public Employees selectOne(long id){
        return employeeRepository.selectOne(id);
    }
}
